home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha Extra 2004 January / CyberMycha Extra 1-2004 (Poland) (Disc 2).bin / Pippi / gmdl.dir / Internal_42_pippi.ls < prev    next >
Encoding:
Text File  |  2001-09-04  |  2.5 KB  |  127 lines

  1. property meSprite, moveAmount, zeroMMV, water
  2. global gmObject, sndObject
  3.  
  4. on beginSprite me
  5.   zeroMMV = 0
  6.   moveAmount = 38
  7.   meSprite = sprite(me.spriteNum)
  8.   water = gmObject.water
  9.   gmObject.pippi = meSprite
  10. end
  11.  
  12. on mouseDown me
  13.   if the frameLabel = "main" then
  14.     if the keyDownScript <> EMPTY then
  15.       set the keyDownScript to EMPTY
  16.       set the keyUpScript to EMPTY
  17.     end if
  18.     if water.frame = 1 then
  19.       if meSprite.member.name <> "0" then
  20.         meSprite.stop()
  21.         updateStage()
  22.       end if
  23.     end if
  24.     stopEvent()
  25.   else
  26.     if the frameLabel = "interLeave" then
  27.       if soundBusy(2) = 0 then
  28.         gmObject.recoverTA()
  29.         go("main")
  30.       end if
  31.     end if
  32.   end if
  33. end
  34.  
  35. on mouseDownOutOf me
  36.   if the frameLabel = "main" then
  37.     if the keyDownScript <> EMPTY then
  38.       set the keyDownScript to EMPTY
  39.       set the keyUpScript to EMPTY
  40.     end if
  41.     if meSprite.member.name <> "0" then
  42.       meSprite.stop()
  43.       moveMe(me)
  44.       meSprite.member = member("0", 1)
  45.       zeroMMV = 1
  46.       updateStage()
  47.     end if
  48.   end if
  49. end
  50.  
  51. on keyDownX me
  52.   if the frameLabel = "main" then
  53.     if water.frame = 1 then
  54.       if meSprite.member.name <> "0" then
  55.         meSprite.stop()
  56.         updateStage()
  57.       end if
  58.     end if
  59.   end if
  60. end
  61.  
  62. on mouseUp me
  63.   if the frameLabel = "main" then
  64.     if water.frame = 1 then
  65.       meSprite.play()
  66.     end if
  67.     stopEvent()
  68.   end if
  69. end
  70.  
  71. on mouseUpOutOf me
  72.   if the frameLabel = "main" then
  73.     meSprite.play()
  74.   end if
  75. end
  76.  
  77. on keyUpX me
  78.   if the frameLabel = "main" then
  79.     if water.frame = 1 then
  80.       meSprite.play()
  81.     end if
  82.   end if
  83. end
  84.  
  85. on exitFrame me
  86.   if the frameLabel = "main" then
  87.     if (meSprite.frame = 4) and (meSprite.member.name = "0") then
  88.       water.loc = point(meSprite.locH, 297)
  89.       water.frame = 1
  90.       water.play()
  91.       sndObject.respondSnd(4, 2, 1, 1)
  92.       updateStage()
  93.     else
  94.       if (zeroMMV = 1) and (meSprite.frame = meSprite.member.frameCount) then
  95.         zeroMMV = 0
  96.       end if
  97.     end if
  98.     moveMe(me)
  99.   end if
  100. end
  101.  
  102. on moveMe me
  103.   if (meSprite.member.name = "-1") and (meSprite.playing = 0) then
  104.     meSprite.member = member("0", 1)
  105.     meSprite.loc = meSprite.loc - point(moveAmount, 0)
  106.     updateStage()
  107.   else
  108.     if (meSprite.member.name = "1") and (meSprite.playing = 0) then
  109.       meSprite.loc = meSprite.loc + point(moveAmount, 0)
  110.       meSprite.member = member("0", 1)
  111.       updateStage()
  112.     end if
  113.   end if
  114. end
  115.  
  116. on mouseEnter me
  117.   cursor([500, 501])
  118. end
  119.  
  120. on mouseLeave me
  121.   cursor(0)
  122. end
  123.  
  124. on endSprite me
  125.   cursor(0)
  126. end
  127.